<?php
$this->breadcrumbs=array(
	'综合控制台'=>array($this->pre_module_url.'/index/index'),
	'开发人员菜单'=>array($this->pre_module_url.'/admMenu/admin'),
	'模型接口'=>array($this->pre_module_url.'/modelApi/admin'),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('model-api-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php echo CHtml::link('搜索选项','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'model-api-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'batchItem'=>array(
				//移动到分类
				CHtml::link(Yii::t('adm','Create').'<b class="mem_bgx left"></b><b class="mem_bgx right"></b>',array('create'),array('class'=>'mem_bgx link_btn mr10')),
		),
	'columns'=>array(
		array('name'=>'zd_model_api_id',
			'value'=>'$data->zd_model_api_id',
			'htmlOptions'=>array('width'=>'5%')
		),
		array('name'=>'model_name',
				'value'=>'$data->model_name',
				'htmlOptions'=>array('width'=>'15%')
		),
		array('name'=>'model_api_name',
				'value'=>'$data->model_api_name',
				'htmlOptions'=>array('width'=>'20%')
		),
		array('name'=>'api_method',
				'value'=>'$data->api_method',
				'htmlOptions'=>array('width'=>'40%')
		),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
